import QtQuick
import QtQuick.Controls.Fusion
import Gui.Components
import Gui.Global as G

Item {
    Row {
        anchors.fill: parent
        AlbumCover {
            id: logo
            width: parent.height - 10
            height: parent.height - 10
            anchors.verticalCenter: parent.verticalCenter
            albumSource: playBarViewModel.albumCover
            MouseArea {
                anchors.fill: parent
                onClicked: {
                    G.SignalBus.openLyricsDetail();
                }
            }
        }

        Column {
            width: parent.width - logo.width - 20
            spacing: 5
            anchors.verticalCenter: parent.verticalCenter
            Label {
                width: parent.width
                text: playBarViewModel.musicInfo
                font.bold: true
                elide: Text.ElideRight
                MToolTip {
                    text: playBarViewModel.musicInfo
                    visible: musicInfoMouseArea.containsMouse
                }

                MouseArea {
                    id: musicInfoMouseArea
                    anchors.fill: parent
                    cursorShape: Qt.PointingHandCursor
                    hoverEnabled: true
                }
            }
            Label {
                width: parent.width
                text: playBarViewModel.currentLyricLine
                elide: Text.ElideRight
            }
        }
    }
}
